package com.liugh.entity.standard;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * Created by Fatao on 2018/9/27
 * 标准体系表
 */

@Builder
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName("standard_system")
public class StandardSystem extends Model<StandardSystem> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private int id;

    /**
     * 0代表根节点
     */
    @TableField("parent_id")
    private int parentId;

    /**
     * 描述
     */
    @TableField("desc")
    private String desc;  //描述

    /**
     * 类型
     */
    @TableField("type")
    private int type;

    /**
     * 标准条目ID
     */
    @TableField("standard_id")
    private int standardId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
